package badDesign
{

/**
 * @author daichangxin
 */
public class IdleState implements IState
{
	private var _context:Context;
	public function IdleState(context:Context)
	{
		_context = context;
	}
	
	public function onEnter() : void
	{
		trace("idle enter");
		
		//test 被炮弹击中切到被击状态
		_context.changeState(Context.ATTACKED);
	}

	public function onExit() : void
	{
		trace("idle exit");
		trace("删除所有注册侦听");
	}

	public function getName() : String
	{
		return Context.IDLE;
	}
}
}
